package com.w7vm.menuweb.entity;

import java.io.Serializable;
import javax.persistence.*;

import java.util.Date;
import java.util.List;
import java.util.Set;


/**
 * The persistent class for the RestauranteSedeWeb database table.
 * 
 */
@Entity
@NamedQueries({
	@NamedQuery(name="Restaurante.findRestauranteSedeByID", 
			query="SELECT rs" +
					" FROM RestauranteSedeWeb rs" +
					" JOIN rs.restauranteSedeEnderecoWebs send " +
					" JOIN rs.restauranteSedeJuridicoWeb sjur " +
					" WHERE rs.idRestauranteSedeWeb = :idRestaurante"),
					
	@NamedQuery(name="Restaurante.findSedeByCNPJ", 
			query="SELECT rs" +
					" FROM RestauranteSedeWeb rs" +
					" JOIN rs.restauranteSedeJuridicoWeb j" +
					" WHERE j.cnpj = :cnpj"),
					
	
})


public class RestauranteSedeWeb implements Serializable {
	private static final long serialVersionUID = 1L;

	public static final String FIND_RestauranteSede_BY_ID = "Restaurante.findRestauranteSedeByID";
	public static final String FIND_SEDE_BY_CNPJ = "Restaurante.findSedeByCNPJ";

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private int idRestauranteSedeWeb;

    @Temporal( TemporalType.DATE)
	@Column(name="DataInc")
	private Date dataInc;

    @Temporal( TemporalType.DATE)
	@Column(name="DtAlt")
	private Date dtAlt;

	@Column(name="Fone1")
	private String fone1;

	@Column(name="Fone2")
	private String fone2;

	@Column(name="Mail")
	private String mail;

	@Column(name="Proprietario")
	private String proprietario;

	@Column(name="Status")
	private int status;
	
	
	@Column(name="Image")
	private String image;

	//bi-directional many-to-one association to ContratoRestaurantesWeb
	@OneToMany(mappedBy="restauranteSedeWeb", cascade=CascadeType.ALL)
	private Set<ContratoRestaurantesWeb> contratoRestaurantesWebs;

	//bi-directional many-to-one association to AcessoWeb
	@OneToMany(mappedBy="restauranteSedeWeb")
	private Set<AcessoWeb> acessoWebs;

	//bi-directional many-to-one association to CardapioBuffetWeb
	@OneToMany(mappedBy="restauranteSedeWeb")
	private Set<CardapioBuffetWeb> cardapioBuffetWebs;

	//bi-directional many-to-one association to CardapioInfantilWeb
	@OneToMany(mappedBy="restauranteSedeWeb")
	private Set<CardapioInfantilWeb> cardapioInfantilWebs;

	//bi-directional many-to-one association to CardapioLaCarteWeb
	@OneToMany(mappedBy="restauranteSedeWeb")
	private Set<CardapioLaCarteWeb> cardapioLaCarteWebs;

	//bi-directional many-to-one association to CardapioSelfServiceWeb
	@OneToMany(mappedBy="restauranteSedeWeb")
	private Set<CardapioSelfServiceWeb> cardapioSelfServiceWebs;

	//bi-directional many-to-one association to RestauranteFilialWeb
	@OneToMany(mappedBy="restauranteSedeWeb",cascade=CascadeType.ALL, fetch=FetchType.EAGER)
	private List<RestauranteFilialWeb> restauranteFilialWebs;

	//bi-directional many-to-one association to RestauranteSedeEnderecoWeb
	@OneToMany(mappedBy="restauranteSedeWeb",cascade=CascadeType.ALL, fetch=FetchType.EAGER)
	private Set<RestauranteSedeEnderecoWeb> restauranteSedeEnderecoWebs;

	//bi-directional many-to-one association to RestauranteSedeInfraestruturaWeb
	@OneToMany(mappedBy="restauranteSedeWeb",fetch=FetchType.EAGER, cascade=CascadeType.PERSIST, orphanRemoval=true)
	private Set<RestauranteSedeInfraestruturaWeb> restauranteSedeInfraestruturaWebs;

	//bi-directional one-to-one association to RestauranteSedeJuridicoWeb
	@OneToOne(mappedBy="restauranteSedeWeb",cascade=CascadeType.ALL,fetch=FetchType.EAGER)
	//@JoinColumn(name="idRestauranteSedeJuridicoWeb",insertable=true,updatable=true,nullable=true,unique=true)
	@JoinColumn(name="idRestauranteSedeWeb")
	private RestauranteSedeJuridicoWeb restauranteSedeJuridicoWeb;

	//bi-directional many-to-one association to CardapioEspecialidadeWeb
	@OneToMany(mappedBy="restauranteSedeWeb")
	private Set<CardapioEspecialidadeWeb> cardapioEspecialidadeWebs;

	//bi-directional many-to-one association to RestauranteCulinariaSy
    @ManyToOne
	@JoinColumn(name="idRestauranteCulinaria")
	private RestauranteCulinariaSy restauranteCulinariaSy;

	//bi-directional many-to-one association to RestauranteServicoSy
    @ManyToOne
	@JoinColumn(name="idRestauranteServicoSys")
	private RestauranteServicoSy restauranteServicoSy;

	//bi-directional many-to-one association to RestauranteTipoSy
    @ManyToOne
	@JoinColumn(name="idRestauranteTipoSys")
	private RestauranteTipoSy restauranteTipoSy;

    public RestauranteSedeWeb() {
    }

	public int getIdRestauranteSedeWeb() {
		return this.idRestauranteSedeWeb;
	}

	public void setIdRestauranteSedeWeb(int idRestauranteSedeWeb) {
		this.idRestauranteSedeWeb = idRestauranteSedeWeb;
	}

	public Date getDataInc() {
		return this.dataInc;
	}

	public void setDataInc(Date dataInc) {
		this.dataInc = dataInc;
	}

	public Date getDtAlt() {
		return this.dtAlt;
	}

	public void setDtAlt(Date dtAlt) {
		this.dtAlt = dtAlt;
	}

	public String getFone1() {
		return this.fone1;
	}

	public void setFone1(String fone1) {
		this.fone1 = fone1;
	}

	public String getFone2() {
		return this.fone2;
	}

	public void setFone2(String fone2) {
		this.fone2 = fone2;
	}

	public String getMail() {
		return this.mail;
	}

	public void setMail(String mail) {
		this.mail = mail;
	}

	public String getProprietario() {
		return this.proprietario;
	}

	public void setProprietario(String proprietario) {
		this.proprietario = proprietario;
	}

	public int getStatus() {
		return this.status;
	}

	public void setStatus(int status) {
		this.status = status;
	}
	
	
	
	public Set<ContratoRestaurantesWeb> getContratoRestaurantesWebs() {
		return this.contratoRestaurantesWebs;
	}

	public void setContratoRestaurantesWebs(Set<ContratoRestaurantesWeb> contratoRestaurantesWebs) {
		this.contratoRestaurantesWebs = contratoRestaurantesWebs;
	}
	

	public Set<AcessoWeb> getAcessoWebs() {
		return this.acessoWebs;
	}

	public void setAcessoWebs(Set<AcessoWeb> acessoWebs) {
		this.acessoWebs = acessoWebs;
	}
	
	public Set<CardapioBuffetWeb> getCardapioBuffetWebs() {
		return this.cardapioBuffetWebs;
	}

	public void setCardapioBuffetWebs(Set<CardapioBuffetWeb> cardapioBuffetWebs) {
		this.cardapioBuffetWebs = cardapioBuffetWebs;
	}
	
	public Set<CardapioInfantilWeb> getCardapioInfantilWebs() {
		return this.cardapioInfantilWebs;
	}

	public void setCardapioInfantilWebs(Set<CardapioInfantilWeb> cardapioInfantilWebs) {
		this.cardapioInfantilWebs = cardapioInfantilWebs;
	}
	
	public Set<CardapioLaCarteWeb> getCardapioLaCarteWebs() {
		return this.cardapioLaCarteWebs;
	}

	public void setCardapioLaCarteWebs(Set<CardapioLaCarteWeb> cardapioLaCarteWebs) {
		this.cardapioLaCarteWebs = cardapioLaCarteWebs;
	}
	
	public Set<CardapioSelfServiceWeb> getCardapioSelfServiceWebs() {
		return this.cardapioSelfServiceWebs;
	}

	public void setCardapioSelfServiceWebs(Set<CardapioSelfServiceWeb> cardapioSelfServiceWebs) {
		this.cardapioSelfServiceWebs = cardapioSelfServiceWebs;
	}
	
	public List<RestauranteFilialWeb> getRestauranteFilialWebs() {
		return this.restauranteFilialWebs;
	}

	public void setRestauranteFilialWebs(List<RestauranteFilialWeb> restauranteFilialWebs) {
		this.restauranteFilialWebs = restauranteFilialWebs;
	}
	
	public Set<RestauranteSedeEnderecoWeb> getRestauranteSedeEnderecoWebs() {
		return this.restauranteSedeEnderecoWebs;
	}

	public void setRestauranteSedeEnderecoWebs(Set<RestauranteSedeEnderecoWeb> restauranteSedeEnderecoWebs) {
		this.restauranteSedeEnderecoWebs = restauranteSedeEnderecoWebs;
	}
	
	public Set<RestauranteSedeInfraestruturaWeb> getRestauranteSedeInfraestruturaWebs() {
		return this.restauranteSedeInfraestruturaWebs;
	}

	public void setRestauranteSedeInfraestruturaWebs(Set<RestauranteSedeInfraestruturaWeb> restauranteSedeInfraestruturaWebs) {
		this.restauranteSedeInfraestruturaWebs = restauranteSedeInfraestruturaWebs;
	}
	
	public RestauranteSedeJuridicoWeb getRestauranteSedeJuridicoWeb() {
		return this.restauranteSedeJuridicoWeb;
	}

	public void setRestauranteSedeJuridicoWeb(RestauranteSedeJuridicoWeb restauranteSedeJuridicoWeb) {
		this.restauranteSedeJuridicoWeb = restauranteSedeJuridicoWeb;
	}
	
	public RestauranteCulinariaSy getRestauranteCulinariaSy() {
		return this.restauranteCulinariaSy;
	}

	public void setRestauranteCulinariaSy(RestauranteCulinariaSy restauranteCulinariaSy) {
		this.restauranteCulinariaSy = restauranteCulinariaSy;
	}
	
	public RestauranteServicoSy getRestauranteServicoSy() {
		return this.restauranteServicoSy;
	}

	public void setRestauranteServicoSy(RestauranteServicoSy restauranteServicoSy) {
		this.restauranteServicoSy = restauranteServicoSy;
	}
	
	public RestauranteTipoSy getRestauranteTipoSy() {
		return this.restauranteTipoSy;
	}

	public void setRestauranteTipoSy(RestauranteTipoSy restauranteTipoSy) {
		this.restauranteTipoSy = restauranteTipoSy;
	}
	
	public Set<CardapioEspecialidadeWeb> getCardapioEspecialidadeWebs() {
		return this.cardapioEspecialidadeWebs;
	}

	public void setCardapioEspecialidadeWebs(Set<CardapioEspecialidadeWeb> cardapioEspecialidadeWebs) {
		this.cardapioEspecialidadeWebs = cardapioEspecialidadeWebs;
	}

	public String getImage() {
		return image;
	}

	public void setImage(String image) {
		this.image = image;
	}
	
	
}